<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<link rel="shortcut icon" type="image/ico" href="images/e.ico" />
		<title>空床信息统计</title>
		<style type="text/css" title="currentStyle">
			@import "css/demo_page.css";
			@import "css/demo_table.css";
		</style>
		<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
		<script type="text/javascript" language="javascript" src="js/jquery.dataTables.js"></script>
		<script type="text/javascript" charset="utf-8">
			$(document).ready(function() {
				var oTable = $('#example').dataTable( {
					"bSortClasses": false,
					"bProcessing": true,
					"sPaginationType": "full_numbers",
					"sAjaxSource": "AjaxAction!getStudentStatistics.action",
					"fnServerData":function(sSource, aoData, fnCallback){
						$.post(sSource,aoData,function(data){
							if (data[0].result == "logout") {
								alert("对不起，登陆超时，请重新登录！");
								parent.window.location.href = "login.html";
								return false;
							} else if (data[0].result == "error") {
								alert("错误！请与管理员联系");
							} else if (data[0].result == "success") {
								fnCallback(data[1]);
							} else if (data[0].result == "permission denied") {
								alert("对不起，您没有权限查看该信息！");
							} else {
								alert("错误，可能是网络不通，请稍后重试，如果问题一直存在，请与维护人员联系！");
							}
						},"json");
					} 
				} );
				oTable.$('td').hover( function() {
					var iCol = $('td', this.parentNode).index(this) % 5;
					$('td:nth-child('+(iCol+1)+')', oTable.$('tr')).addClass( 'highlighted' );
				}, function() {
					oTable.$('td.highlighted').removeClass('highlighted');
				} );
			} );
			
			function exportData(){
				window.open("ExportAction!exportStudent.action","导出数据");
			}
		</script>
	</head>
	<body id="dt_example" class="ex_highlight">
		<div id="container"  style="width:1000px">
			<div class="full_width big">
				学生信息统计
			</div>
			<div id="tool" style="margin-left:950px;">
					<input type="button" onclick="exportData();" class="button" value="导出">
			</div>
			<h1>统计结果</h1>
			<div id="demo">
<table cellpadding="0" cellspacing="0" border="0" align="center" class="display" id="example">
	<thead>
		<tr>
			<th width="10%">学号</th>
			<th width="8%">姓名</th>
			<th width="10%">民族</th>
			<th width="7%">性别</th>
			<th width="10%">学院</th>
			<th width="8%">专业</th>
			<th width="10%">政治面貌</th>
			<th width="10%">手机</th>
			<th width="10%">公寓</th>
			<th width="10%">房间</th>
			<th width="7%">床位</th>
		</tr>
	</thead>
	<tbody>		
	</tbody>
	<tfoot>
		<tr>
			<th width="10%">学号</th>
			<th width="8%">姓名</th>
			<th width="10%">民族</th>
			<th width="7%">性别</th>
			<th width="10%">学院</th>
			<th width="8%">专业</th>
			<th width="10%">政治面貌</th>
			<th width="10%">手机</th>
			<th width="10%">公寓</th>
			<th width="10%">房间</th>
			<th width="7%">床位</th>
		</tr>
	</tfoot>
</table>
			</div>
		</div>
	</body>
</html>